package com.vilicode.mapper;

import com.vilicode.bean.Book;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RecommendMapper {
    public List<Book> queryBookByRecommendType(@Param("rtype")int rtype, @Param("pageIndex")int pageIndex,@Param("pageSize") int pageSize); //按推荐类型查询图书
    public int queryRecommendCountOfBooksByTypeID(@Param("rtype")int rtype);//根据推荐类型查询总数
    public int queryBookByRtypeAndBid(@Param("rtype")int rtype,@Param("bid")int bid);
    public void addRecommendBook(@Param("bid")int bid,@Param("rtype")int rtype);//添加推荐书籍
    public void removeRecommendBook(@Param("bid")int bid,@Param("rtype")int rtype);//删除推荐书籍
    public void removeRecommend(@Param("bid")int bid);
}
